home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
winexit
/
winexit.frm
< prev
next >
Wrap
Text File
|
1994-08-26
|
4KB
|
176 lines
VERSION 2.00
Begin Form frmWinExit
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
Caption = "Exit Windows"
ClientHeight = 2145
ClientLeft = 2115
ClientTop = 1980
ClientWidth = 2055
Height = 2835
Icon = WINEXIT.FRX:0000
Left = 2055
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 2145
ScaleWidth = 2055
Top = 1350
Width = 2175
Begin CommandButton cmdCancel
BackColor = &H00C0C0C0&
Cancel = -1 'True
Caption = "Cancel"
Height = 315
Left = 720
TabIndex = 5
Top = 1740
Width = 1215
End
Begin OptionButton optChoice
BackColor = &H00C0C0C0&
Caption = "Exit && Reboot"
Height = 315
Index = 2
Left = 180
TabIndex = 2
Top = 960
Width = 1575
End
Begin OptionButton optChoice
BackColor = &H00C0C0C0&
Caption = "Restart Windows"
Height = 315
Index = 1
Left = 180
TabIndex = 1
Top = 540
Width = 1755
End
Begin OptionButton optChoice
BackColor = &H00C0C0C0&
Caption = "Exit Windows"
Height = 315
Index = 0
Left = 180
TabIndex = 0
Top = 120
Value = -1 'True
Width = 1515
End
Begin PictureBox picOpenDoor
AutoSize = -1 'True
BackColor = &H00C0C0C0&
BorderStyle = 0 'None
Height = 480
Left = 120
Picture = WINEXIT.FRX:0302
ScaleHeight = 480
ScaleWidth = 480
TabIndex = 4
TabStop = 0 'False
Top = 1500
Width = 480
End
Begin CommandButton cmdOK
BackColor = &H00C0C0C0&
Caption = "OK"
Default = -1 'True
Height = 315
Left = 720
TabIndex = 3
Top = 1380
Width = 1215
End
Begin Menu mnuOptions
Caption = "&Options"
Begin Menu mnuExit
Caption = "E&xit"
End
Begin Menu mnuRestart
Caption = "&Restart"
End
Begin Menu mnuReboot
Caption = "Exit && Re&boot"
End
End
Begin Menu mnuAbout
Caption = "&About"
End
End
Option Explicit
Sub cmdCancel_Click ()
End
End Sub
Sub cmdOK_Click ()
If optChoice(0).Value Then
Call WinExit(0)
ElseIf optChoice(1).Value Then
Call WinExit(1)
ElseIf optChoice(2).Value Then
Call WinExit(2)
End If
End Sub
Sub Form_Load ()
If UCase$(Command$) = "EXIT" Then
optChoice(0).Value = True
WinExit (0)
ElseIf UCase$(Command$) = "RESTART" Then
optChoice(1).Value = True
WinExit (1)
ElseIf UCase$(Command$) = "REBOOT" Then
optChoice(2).Value = True
WinExit (2)
End If
CentreForm Me
End Sub
Sub Form_Paint ()
MakeForm3D Me
End Sub
Sub Form_Resize ()
' Don't let the user resize the form
' i've made the form sizable as if you use menu
' you can't have a fixed double border
If windowstate <> 1 Then
width = 2130
height = 2835
End If
End Sub
Sub mnuAbout_Click ()
frmAbout.Show 1
End Sub
Sub mnuExit_Click ()
Call WinExit(0)
End Sub
Sub mnuReboot_Click ()
Call WinExit(2)
End Sub
Sub mnuRestart_Click ()
Call WinExit(1)
End Sub